package gameobjects.factories
{
	import gameobjects.Enemy;
	import gameobjects.Projectile;
	import gameobjects.Tower;

	public class GameObjectsFactory
	{
		private static var enemies:Vector.<Enemy> = new Vector.<Enemy>();
		private static var projectiles:Vector.<Projectile> = new Vector.<Projectile>();
		private static var towers:Vector.<Tower> = new Vector.<Tower>();
		
		public static function makeProjectile():Projectile
		{
			var i:int = 0;
			if(projectiles.length == 0)
			{
				return new Projectile();
			}
			else
			{
				var pom:Projectile = projectiles[projectiles.length - 1];
				projectiles.pop();
				return pom;
			}
		}
	}
}